<%@ page import="com.zzty.entity.User" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>历史分享</title>
    <link rel="stylesheet" href="../css/style.default.css" type="text/css" />


    <!--[if lte IE 8]><script language="javascript" type="text/javascript" src="../js/excanvas.min.js"></script><![endif]-->
    <!--[if IE 9]>
    <link rel="stylesheet" media="screen" href="../css/style.ie9.css"/>
    <![endif]-->
    <!--[if IE 8]>
    <link rel="stylesheet" media="screen" href="../css/style.ie8.css"/>
    <![endif]-->
    <!--[if lt IE 9]>
    <script src="../js/css3-mediaqueries.js"></script>
    <![endif]-->
    <script type="text/javascript" src="../js/jquery-1.7.min.js"></script>
    <script type="text/javascript" src="../js/jquery-ui-1.8.16.custom.min.js"></script>
    <script type="text/javascript" src="../js/jquery.cookie.js"></script>
    <script type="text/javascript" src="../js/jquery.dataTables.min.js"></script>
    <script type="text/javascript" src="../js/jquery.uniform.min.js"></script>
    <script type="text/javascript" src="../js/general.js"></script>
    <script type="text/javascript" src="../js/tables.js"></script>

    <script type="text/javascript">
        var path = '<%=request.getContextPath()%>';

        function searchContent(){
            ajaxCall("GET",path+"/ShareServlet?method=searchContent",initTable);

        }
        function initTable(result) {
            var obj = JSON.parse(result);
            var table=document.getElementById("tbody");
            for ( var i in obj) {
                var newRow=table.insertRow(i);
                var x=newRow.insertCell(0);
                var y=newRow.insertCell(1);
                var z = newRow.insertCell(2);
                x.innerText=obj[i].id;
                y.innerText=obj[i].date;
                z.innerText = obj[i].content;
            }
        }
        function ajaxCall(method,url,callBackFunction){
            var httprequest=new XMLHttpRequest();
            httprequest.onreadystatechange=function(){
                if(httprequest.readyState==4&&httprequest.status==200){
                    callBackFunction(httprequest.responseText);
                }
            }
            httprequest.open(method,url,true);
            httprequest.send();
        }
    </script>
    <script src="../js/change.js"></script>
</head>

<body class="withvernav" onload="searchContent()">
<div class="bodywrapper">
    <div class="topheader">
        <div class="left">
            <h1 class="logo"><span>ZZTY</span></h1>
            <span class="slogan">自在天原学习系统</span>



            <br clear="all" />

        </div><!--left-->
        <% User user=(User)session.getAttribute("user");
        %>
        <div class="right">
            <!--<div class="notification">
                <a class="count" href="ajax/notifications.html"><span>9</span></a>
            </div>-->
            <div class="userinfo">
                <img src="../images/thumbs/avatar.png" alt="" />
                <span><%=user.getName()%></span>
            </div><!--userinfo-->

            <div class="userinfodrop">
                <div class="avatar">
                    <a href=""><../img src="images/thumbs/avatarbig.png" alt="" /></a>

                </div><!--avatar-->
                <div class="userdata">

                    <ul>
                        <li>名字:<%=user.getName()%></li>
                        <li>班级:java<%=user.getClassId()%>班</li>
                        <li>邮箱:<%=user.getEmail()%></li>
                        <li>类型:<%=user.getType()%></li>
                        <li><a href="change.jsp">修改信息</a></li>
                        <li><a href="../login.jsp">退出</a></li>
                    </ul>
                </div><!--userdata-->
            </div><!--userinfodrop-->
        </div><!--right-->
    </div><!--topheader-->


    <div class="header">
        <ul class="headermenu">
            <li><a href="Smain.jsp"><span class="icon icon-flatscreen"></span>首页</a></li>
            <li><a href="todayTeamExam.jsp"><span class="icon icon-pencil"></span>结对</a></li>
            <li ><a href="todayExam.jsp"><span class="icon icon-message"></span>竞赛</a></li>
            <li class="current"><a href="share1.jsp"><span class="icon icon-chart"></span>课堂分享</a></li>
        </ul>



    </div><!--header-->

    <div class="vernav">
        <ul>
            <li><a href="share1.jsp" >课堂分享</a></li>
            <li class="current"><a href="historyShare.jsp">历史分享</a></li>
        </ul>
        <a class="togglemenu"></a>
    </div><!--leftmenu-->

    <div class="centercontent">

        <div class="pageheader">
            <h1 class="pagetitle">课堂分享</h1>

        </div><!--pageheader-->

        <!--div id="contentwrapper" class="contentwrapper withrightpanel">

            <div id="calendar"></div>

        </div-->

        <br clear="all" />

        <table cellpadding="0" cellspacing="0" border="0" class="stdtable" id="dyntable2" >
            <colgroup>
                <col class="con0" style="width: 4%" />
                <col class="con1" />
            </colgroup>
            <thead>
            <tr>
                <th class="head1">id</th>
                <th class="head1">日期</th>
                <th class="head1">分享内容</th>

            </tr>
            </thead>
            <tfoot>
            <tr>
                <th class="head1">id</th>
                <th class="head1">日期</th>
                <th class="head1">分享内容</th>

            </tr>
            </tfoot>
            <tbody id="tbody">
            <!--tr class="gradeX">
                <td>2018-5-20</td>
                <td>重载</td>

            </tr-->
            </tbody>
        </table>

    </div><!--contentwrapper-->




</div><!-- centercontent -->


</div><!--bodywrapper-->

</body>
</html>
